// pages/result/result.js
Page({

    /**
     * 页面的初始数据
     */
    data: {
        sname:'',

        ismix:false,

        isqr:false,

        ismap:false,

        isCamera:false,
    },

    /**
     * 生命周期函数--监听页面加载
     */
    onLoad: function (options) {
        this.setData({
            sname:options.sname,
        })
        let signList = this;
        let signId = options.Id;
        console.log(options.Id);
        if(options.type==0){
            wx.request({
                url: 'http://localhost/public/sign/sign/mixsignlist?signId='+signId,
                data: {},
                header: {'content-type':'application/json'},
                method: "GET",
                success: ({data}) => {
                    console.log(data)
                    signList.setData({
                        data:data,
                    })
                },
            })

            this.setData({
                ismix:true,
            })
        }

        if(options.type==1){
            wx.request({
                url: 'http://localhost/public/sign/sign/qrsignlist?signId='+signId,
                data: {},
                header: {'content-type':'application/json'},
                method: "GET",
                success: ({data}) => {
                    console.log(data)
                    signList.setData({
                        data:data,
                    })
                },
            })
            this.setData({
                isqr:true,
            })
        }

        if(options.type==2){
            wx.request({
                url: 'http://localhost/public/sign/sign/mapsignlist?signId='+signId,
                data: {},
                header: {'content-type':'application/json'},
                method: "GET",
                success: ({data}) => {
                    console.log(data)
                    signList.setData({
                        data:data,
                    })
                },
            })
            this.setData({
                ismap:true,
            })
        }

        if(options.type==3){
            wx.request({
                url: 'http://localhost/public/sign/sign/photosignlist?signId='+signId,
                data: {},
                header: {'content-type':'application/json'},
                method: "GET",
                success: ({data}) => {
                    console.log(data)
                    signList.setData({
                        data:data,
                    })
                },
            })
            this.setData({
                isCamera:true,
            })
        }

    },

    

    /**
     * 用户点击右上角分享
     */
    onShareAppMessage: function () {

    }
})